projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7984131
)
iconhelper: treat the empty string as a NULL icon name
author
Cosimo Cecchi
<cosimoc@gnome.org>
Thu, 15 Dec 2011 19:01:35 +0000
(20:01 +0100)
committer
Cosimo Cecchi
<cosimoc@gnome.org>
Thu, 15 Dec 2011 19:01:35 +0000
(20:01 +0100)
Treat the empty string as if it was a NULL icon name instead of
rendering GTK_STOCK_MISSING_IMAGE.
This used to be the previous behavior of GtkCellRendererPixbuf and
applications might still rely on it.
gtk/gtkiconhelper.c
patch
|
blob
|
history
diff --git
a/gtk/gtkiconhelper.c
b/gtk/gtkiconhelper.c
index 30f7e2cbebfc8e71ff2cb11761383968375e53c3..ae1cb68091c7f99d7616514c49f30b3c79184a5a 100644
(file)
--- a/
gtk/gtkiconhelper.c
+++ b/
gtk/gtkiconhelper.c
@@
-378,7
+378,8
@@
_gtk_icon_helper_set_icon_name (GtkIconHelper *self,
{
_gtk_icon_helper_clear (self);
- if (icon_name != NULL)
+ if (icon_name != NULL &&
+ g_strcmp0 (icon_name, "") != 0)
{
self->priv->storage_type = GTK_IMAGE_ICON_NAME;
self->priv->icon_name = g_strdup (icon_name);